home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / System / Sample 2.4 Think C distribution / scn.h < prev    next >
Text File  |  1990-08-29  |  2KB  |  43 lines

  1. /*______________________________________________________________________
  2.  
  3.     scn.h - Volume Scanning Module Interface.
  4.     
  5.     Copyright © 1988, 1989, 1990 Northwestern University.  Permission is granted
  6.     to use this code in your own projects, provided you give credit to both
  7.     John Norstad and Northwestern University in your about box or document.
  8. _____________________________________________________________________*/
  9.  
  10. #ifndef __scn__
  11. #define __scn__
  12.  
  13.  
  14. /* The following structure is used to maintain a list of folder names.  
  15.     
  16.     When the caller-supplied doFile routine is called, it is passed a
  17.     handle to the head of the list.  The list contains all the 
  18.     folder names in the current path, in reverse order (lowest-level 
  19.     folder name to highest-level folder name).  The list is maintained as 
  20.     a push-down stack:  When a new folder is encountered it is added to the 
  21.     head of the list, and it is removed when the scan of that folder is 
  22.     complete. */
  23.  
  24. typedef struct scn_FListEl {
  25.     struct scn_FListEl    **next;            /* handle to next folder name */
  26.     Str255                    name;                /* folder name */
  27.     char                        accessRights;    /* access rights - see IM V-391 */
  28. } scn_FListEl, *scn_FListElPtr, **scn_FListElHandle;
  29.  
  30. typedef Boolean (*scn_DoFilePtr)(CInfoPBRec *pBlock,
  31.     scn_FListElHandle folderList, long RefCon, Boolean mfs);
  32.  
  33. typedef Boolean (*scn_CheckCancelPtr)(void);
  34.  
  35. extern Boolean scn_Vol (short volRefNum, long dirID, 
  36.     Str255 *fName, short fVRefNum, scn_DoFilePtr doFile, 
  37.     long refCon, scn_CheckCancelPtr checkCancel, 
  38.     Rect *fldNameRect, Rect *fleNameRect, Rect *thrmRect, 
  39.     short nameFont, short nameSize);
  40. extern void scn_Update (Rect *thrmRect);
  41.  
  42.  
  43. #endif